{-# LANGUAGE DerivingStrategies #-}

module Aria2.File where

import Aria2.Bytes (Bytes)
import Aria2.URI (URIInfo)
import Data.Text (Text)
import Data.Vector.NonEmpty (NonEmptyVector)

data FileInfo = F
  { _index :: {-# UNPACK #-} !Word,
    _path :: {-# UNPACK #-} !Text,
    _length :: {-# UNPACK #-} !Bytes,
    _completedLength :: {-# UNPACK #-} !Bytes,
    _selected :: !Bool,
    _uris :: {-# UNPACK #-} !(NonEmptyVector URIInfo)
  }
  deriving stock (Eq, Show)
